import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/app/policy-ch',
    name: 'PolicyCH',
    component: () => import('@/views/app/PolicyCH.vue')
  },
  {
    path: '/app/policy-en',
    name: 'PolicyEN',
    component: () => import('@/views/app/PolicyEN.vue')
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

// 配置白名单
// const whiteList = ["Policy"];

// router.beforeEach((to, from, next) => {
//   // if (whiteList.includes(to.name)) {
//   //   next();
//   // } else {
//   //   next('/') 
//   // }
// });


export default router
